home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / content / nsIRadioControlElement.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  4KB  |  119 lines

  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2.  
  3. /* ***** BEGIN LICENSE BLOCK *****
  4.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  5.  *
  6.  * The contents of this file are subject to the Mozilla Public License Version
  7.  * 1.1 (the "License"); you may not use this file except in compliance with
  8.  * the License. You may obtain a copy of the License at
  9.  * http://www.mozilla.org/MPL/
  10.  *
  11.  * Software distributed under the License is distributed on an "AS IS" basis,
  12.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  13.  * for the specific language governing rights and limitations under the
  14.  * License.
  15.  *
  16.  * The Original Code is mozilla.org code.
  17.  *
  18.  * The Initial Developer of the Original Code is
  19.  * John B. Keiser
  20.  * Portions created by the Initial Developer are Copyright (C) 2001
  21.  * the Initial Developer. All Rights Reserved.
  22.  *
  23.  * Contributor(s):
  24.  *
  25.  * Alternatively, the contents of this file may be used under the terms of
  26.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  27.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  28.  * in which case the provisions of the GPL or the LGPL are applicable instead
  29.  * of those above. If you wish to allow use of your version of this file only
  30.  * under the terms of either the GPL or the LGPL, and not to allow others to
  31.  * use your version of this file under the terms of the MPL, indicate your
  32.  * decision by deleting the provisions above and replace them with the notice
  33.  * and other provisions required by the GPL or the LGPL. If you do not delete
  34.  * the provisions above, a recipient may use your version of this file under
  35.  * the terms of any one of the MPL, the GPL or the LGPL.
  36.  *
  37.  * ***** END LICENSE BLOCK ***** */
  38.  
  39. #ifndef nsIRadioControlElement_h___
  40. #define nsIRadioControlElement_h___
  41.  
  42. #include "nsISupports.h"
  43. #include "nsIRadioGroupContainer.h"
  44. class nsAString;
  45. class nsIForm;
  46.  
  47. // IID for the nsIRadioControl interface
  48. #define NS_IRADIOCONTROLELEMENT_IID \
  49. { 0x647dff84, 0x1dd2, 0x11b2, \
  50.     { 0x95, 0xcf, 0xe5, 0x01, 0xa8, 0x54, 0xa6, 0x40 } }
  51.  
  52. /**
  53.  * This interface is used for the text control frame to store its value away
  54.  * into the content.
  55.  */
  56. class nsIRadioControlElement : public nsISupports {
  57. public:
  58.  
  59.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IRADIOCONTROLELEMENT_IID)
  60.  
  61.   /**
  62.    * Set the radio button checked, but don't do any extra checks and don't
  63.    * trigger "value changed".  This is for experts only.  Do not try this
  64.    * at home.  Well, OK, try it at home, but not late at night.
  65.    */
  66.   NS_IMETHOD RadioSetChecked(PRBool aNotify) = 0;
  67.  
  68.   /**
  69.    * Let this radio button know that the radio group's "checked" property has
  70.    * been changed by JavaScript or by the user
  71.    *
  72.    * @param aCheckedChanged whether the checked property has been changed.
  73.    * @param aOnlyOnThisRadioButton set to TRUE to only set the property only on
  74.    *        the radio button in question; otherwise it will set the property on
  75.    *        all other radio buttons in its group just to be sure they are
  76.    *        consistent.
  77.    */
  78.   NS_IMETHOD SetCheckedChangedInternal(PRBool aCheckedChanged) = 0;
  79.  
  80.   /**
  81.    * Let an entire radio group know that it's "checked" property has been
  82.    * changed by JS or by the user (calls SetCheckedChangedInternal multiple
  83.    * times via a visitor)
  84.    *
  85.    * @param aCheckedChanged whether the checked property has been changed.
  86.    */
  87.   NS_IMETHOD SetCheckedChanged(PRBool aCheckedChanged) = 0;
  88.  
  89.   /**
  90.    * Find out whether this radio group's "checked" property has been changed by
  91.    * JavaScript or by the user
  92.    *
  93.    * @param aCheckedChanged out param, whether the checked property has been
  94.    *        changed.
  95.    */
  96.   NS_IMETHOD GetCheckedChanged(PRBool* aCheckedChanged) = 0;
  97.  
  98.   /**
  99.    * Let this radio button know that state has been changed such that it has
  100.    * been added to a group.
  101.    */
  102.   NS_IMETHOD AddedToRadioGroup(PRBool aNotify = PR_TRUE) = 0;
  103.  
  104.   /**
  105.    * Let this radio button know that it is about to be removed from the radio
  106.    * group it is currently in (the relevant properties should not have changed
  107.    * yet).
  108.    */
  109.   NS_IMETHOD WillRemoveFromRadioGroup() = 0;
  110.  
  111.   /**
  112.    * Get the radio group container for this radio button
  113.    * @return the radio group container (or null if no container)
  114.    */
  115.   virtual already_AddRefed<nsIRadioGroupContainer> GetRadioGroupContainer() = 0;
  116. };
  117.  
  118. #endif // nsIRadioControlElement_h___
  119.